package extend;

/**
 * @Author 幻忧
 * @Date 2020/12/13 18:30
 * @Version 1.0
 * @Description 臣子参拜皇帝的过程
 */
public class Minister {

    public static void main(String[] args) {
        //定义5个大臣
        int ministerNum = 5;

        for (int i = 0; i < ministerNum; i++) {
            Emperor emperor = Emperor.getInstance();
            System.out.print("第" + (i + 1) + "个大臣参拜的是：");
            emperor.say();
        }
    }
}
